<html>
  <head>
    <title>Debugger-test</title>

    <script type="text/javascript">
      include("Debugger.js");

      module('Debugger Core');

        test("testNonInstrusiveAttachment", 3, function() {
          var object = {
            foo : function() {
              this.bar();
            },

            bar : function() {
              throw new Error("I'm a really bad exception!");
            }
          };

          var context = new Debugger.Context(function(event) {
            print("Oops! You became exceptional.");
          });

          Debugger.attach(object, context);

          object.foo();

          ok(true, true);
          ok(true, true);
          ok(true, true);
        });

      print("All tests finished.");
    </script>
  </head>
  <body>
    <p id="qunit-tests" class="result"></p>
  </body>
</html>
